<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Canbot: CanBotLL Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Canbot
   
   </div>
   <div id="projectbrief">TEAM B</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">CanBotLL Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="CanBotLL" -->
<p><a class="el" href="classCanBotLL.html" title="CanBotLL is the Low Level implementation on CanBot. This class is responsible for the serial communic...">CanBotLL</a> is the Low Level implementation on CanBot. This class is responsible for the serial communication with the robot.  
 <a href="classCanBotLL.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="CanBotLL_8h_source.html">CanBotLL.h</a>&gt;</code></p>

<p><a href="classCanBotLL-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanBotLL.html#a3060fba49d13632f2a2d54cac98e0ddf">CanBotLL</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanBotLL.html#a087386b4c135c16f773663fed6eb59d2">~CanBotLL</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanBotLL.html#a24f80105dff33991e6aa24f0aace2a0b">claw</a> (int open_close)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanBotLL.html#a93694ef7809a249f10ebedfca98bbcc1">turn</a> (int angle)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanBotLL.html#a5b6e2cb5ef7e052dc937abc605c090ed">drive</a> (int <a class="el" href="classCanBotLL.html#ab42fa57d0f4339ff15e2d83f9188b987">distance</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanBotLL.html#a06c977b32a0207f009bcf71b292f4ed4">catchCan</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanBotLL.html#ab42fa57d0f4339ff15e2d83f9188b987">distance</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanBotLL.html#a60c06aee49f028b504e181c81ccf0175">turnStart</a> (int dir)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanBotLL.html#a98be95fe221b50461a960f28117e83f9">driveStart</a> (int dir)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanBotLL.html#a2850c2db5c516b349ce8f873ebcb9b2f">movementStop</a> ()</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classCanBotLL.html" title="CanBotLL is the Low Level implementation on CanBot. This class is responsible for the serial communic...">CanBotLL</a> is the Low Level implementation on CanBot. This class is responsible for the serial communication with the robot. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a3060fba49d13632f2a2d54cac98e0ddf"></a><!-- doxytag: member="CanBotLL::CanBotLL" ref="a3060fba49d13632f2a2d54cac98e0ddf" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCanBotLL.html#a3060fba49d13632f2a2d54cac98e0ddf">CanBotLL::CanBotLL</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p><a class="el" href="classCanBotLL.html" title="CanBotLL is the Low Level implementation on CanBot. This class is responsible for the serial communic...">CanBotLL</a> constructor This constructor initializes a serial connection. Next it will wait for the user to press START </p>

</div>
</div>
<a class="anchor" id="a087386b4c135c16f773663fed6eb59d2"></a><!-- doxytag: member="CanBotLL::~CanBotLL" ref="a087386b4c135c16f773663fed6eb59d2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classCanBotLL.html#a087386b4c135c16f773663fed6eb59d2">CanBotLL::~CanBotLL</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p><a class="el" href="classCanBotLL.html" title="CanBotLL is the Low Level implementation on CanBot. This class is responsible for the serial communic...">CanBotLL</a> destructor It will do no more then closing the serial port </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a06c977b32a0207f009bcf71b292f4ed4"></a><!-- doxytag: member="CanBotLL::catchCan" ref="a06c977b32a0207f009bcf71b292f4ed4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classCanBotLL.html#a06c977b32a0207f009bcf71b292f4ed4">CanBotLL::catchCan</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>function meant to catch a can</p>
<p>Before this function is called it is necessary that a can is in front of the robot The robot will drive till a can is between the claw, closes the claw </p>

</div>
</div>
<a class="anchor" id="a24f80105dff33991e6aa24f0aace2a0b"></a><!-- doxytag: member="CanBotLL::claw" ref="a24f80105dff33991e6aa24f0aace2a0b" args="(int open_close)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classCanBotLL.html#a24f80105dff33991e6aa24f0aace2a0b">CanBotLL::claw</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>open_close</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This function drives the robots claw </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">open_close</td><td>int which describes the movement please use CLAW_OPEN and CLAW_CLOSE (defined const) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab42fa57d0f4339ff15e2d83f9188b987"></a><!-- doxytag: member="CanBotLL::distance" ref="ab42fa57d0f4339ff15e2d83f9188b987" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classCanBotLL.html#ab42fa57d0f4339ff15e2d83f9188b987">CanBotLL::distance</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>function meant to read out the distance sensor it returns the read value </p>

</div>
</div>
<a class="anchor" id="a5b6e2cb5ef7e052dc937abc605c090ed"></a><!-- doxytag: member="CanBotLL::drive" ref="a5b6e2cb5ef7e052dc937abc605c090ed" args="(int distance)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classCanBotLL.html#a5b6e2cb5ef7e052dc937abc605c090ed">CanBotLL::drive</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>distance</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>function meant to drive over a predefined distance</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">distance</td><td>int which describes the distance to drive (negative to drive backwards, positive to drive forward) This function uses an assumption for the time (us) needed to drive 1px (US_1UNIT_HS) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a98be95fe221b50461a960f28117e83f9"></a><!-- doxytag: member="CanBotLL::driveStart" ref="a98be95fe221b50461a960f28117e83f9" args="(int dir)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classCanBotLL.html#a98be95fe221b50461a960f28117e83f9">CanBotLL::driveStart</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dir</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>function starts the robot driving </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">dir</td><td>int which describes the direction to drive (0 to drive backwards, 1 to drive forward) it is important to call <a class="el" href="classCanBotLL.html#a2850c2db5c516b349ce8f873ebcb9b2f">movementStop()</a> to stop the robots driving </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classCanBotLL.html#a60c06aee49f028b504e181c81ccf0175">turnStart(int dir)</a> </dd>
<dd>
<a class="el" href="classCanBotLL.html#a2850c2db5c516b349ce8f873ebcb9b2f">movementStop()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a2850c2db5c516b349ce8f873ebcb9b2f"></a><!-- doxytag: member="CanBotLL::movementStop" ref="a2850c2db5c516b349ce8f873ebcb9b2f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classCanBotLL.html#a2850c2db5c516b349ce8f873ebcb9b2f">CanBotLL::movementStop</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>function stops the robot from moving this function is called after turnStart or driveStart </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classCanBotLL.html#a60c06aee49f028b504e181c81ccf0175">turnStart(int dir)</a> </dd>
<dd>
<a class="el" href="classCanBotLL.html#a98be95fe221b50461a960f28117e83f9">driveStart(int dir)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a93694ef7809a249f10ebedfca98bbcc1"></a><!-- doxytag: member="CanBotLL::turn" ref="a93694ef7809a249f10ebedfca98bbcc1" args="(int angle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classCanBotLL.html#a93694ef7809a249f10ebedfca98bbcc1">CanBotLL::turn</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>angle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>function meant to turn over a predefined angle</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">angle</td><td>int which describes the angle to turn (negative to turn clockwise, positive to turn counter clockwise) This function uses an assumption for the time (us) needed to turn 1deg (US_1DG_HS) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a60c06aee49f028b504e181c81ccf0175"></a><!-- doxytag: member="CanBotLL::turnStart" ref="a60c06aee49f028b504e181c81ccf0175" args="(int dir)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classCanBotLL.html#a60c06aee49f028b504e181c81ccf0175">CanBotLL::turnStart</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dir</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>function starts turning the robot </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">dir</td><td>int which describes the direction to turn (0 to turn clockwise, 1 to turn counter clockwise) it is important to call <a class="el" href="classCanBotLL.html#a2850c2db5c516b349ce8f873ebcb9b2f">movementStop()</a> to stop the robots turning </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classCanBotLL.html#a98be95fe221b50461a960f28117e83f9">driveStart(int dir)</a> </dd>
<dd>
<a class="el" href="classCanBotLL.html#a2850c2db5c516b349ce8f873ebcb9b2f">movementStop()</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="CanBotLL_8h_source.html">CanBotLL.h</a></li>
</ul>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 25 2014 16:43:26 for Canbot by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
